INCLUDE(PylotOptions)

# pyLot libraries
# ================

SET(PYLOT_BUILD_TYPE @CMAKE_BUILD_TYPE@)
SET(CURRENT_BUILD_TYPE ${CMAKE_BUILD_TYPE})

IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
  FIND_PATH(PYLOT_LIBRARY_DIR
    NAMES libpyLot.so libpyLot.a libpyLot.dll
    PATHS "${CMAKE_LIBRARY_PATH}" "${LIB}"
    "@CMAKE_INSTALL_PREFIX@/@PYLOTPATH_LIB_DEBUG@"
    )
ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
  FIND_PATH(PYLOT_LIBRARY_DIR
    NAMES libpyLot.so libpyLot.a libpyLot.dll
    PATHS "${CMAKE_LIBRARY_PATH}" "${LIB}"
    "@CMAKE_INSTALL_PREFIX@/@PYLOTPATH_LIB_STD@"
    )
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")

SET(PYLOTPATH @CMAKE_INSTALL_PREFIX@)

IF(PYLOT_LIBRARY_DIR)
  MESSAGE(STATUS "Looking for pyLot ... - found (${PYLOT_LIBRARY_DIR})")
ELSE(PYLOT_LIBRARY_DIR)
  MESSAGE(STATUS "Looking for pyLot ... - NOT found")
ENDIF(PYLOT_LIBRARY_DIR)

# search in include directory created during installation
FIND_PATH(PYLOT_INCLUDE_DIR pyLot "@CMAKE_INSTALL_PREFIX@/@PYLOTPATH_INCLUDE@" NO_DEFAULT_PATH)
# If not found (for example if user moves pylot include directory),
# search in standard include directory
FIND_PATH(PYLOT_INCLUDE_DIR pyLot NO_SYSTEM_ENVIRONMENT_PATH)
FIND_PATH(PYLOT_INCLUDE_DIR pyLot)

IF(PYLOT_INCLUDE_DIR)
  MESSAGE(STATUS "Looking for pyLot include ... - found (${PYLOT_INCLUDE_DIR})")
ELSE(PYLOT_INCLUDE_DIR)
  MESSAGE(FATAL_ERROR "Looking for pyLot include ... - NOT found")
ENDIF(PYLOT_INCLUDE_DIR)
